import 'package:color_dart/RgbaColor.dart';
import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/components/a_button/index.dart';
import 'package:im_flutter_sdk_example/components/labels/index.dart';
import 'package:im_flutter_sdk_example/utils/constants.dart';

class MessageItem extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return ListTile(
        title: Row(
          children: [
            Padding(
              padding: const EdgeInsets.symmetric(vertical: 6),
              child: Text('张晓乐', style: mainTitleStyle),
            ),
            Container(
                margin: EdgeInsets.only(left: 10),
                child: Row(children: [LabelExpert()]))
          ],
        ),
        subtitle: Text('申请加入到您的小组，请完成审核！',
            style: TextStyle(color: rgba(136, 135, 135, 1), fontSize: 13)),
        leading: SizedBox(
          width: 60,
          height: 60,
          child: ClipOval(
            child: Image.asset(
              'lib/assets/images/order/order1.png',
              width: 30,
              height: 30,
              fit: BoxFit.cover,
            ),
          ),
        ),
        trailing: Column(
          children: [
            Padding(
              padding: EdgeInsets.only(bottom: 6),
              child: AButton.normal(
                  bgColor: rgba(255, 255, 255, 1),
                  width: 55,
                  height: 25,
                  borderColor: rgba(47, 128, 250, 1),
                  plain: true,
                  borderRadius: BorderRadius.circular(12),
                  color: rgba(42, 125, 250, 1),
                  child: Text('通过')),
            ),
            AButton.normal(
                bgColor: rgba(255, 255, 255, 1),
                width: 55,
                height: 25,
                borderColor: rgba(216, 216, 216, 1),
                plain: true,
                borderRadius: BorderRadius.circular(12),
                color: rgba(102, 102, 102, 1),
                child: Text('拒绝')),
          ],
        ));
  }
}
